﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Descripción breve de ScreenContent
/// </summary>
public class ScreenContent
{
    public enum ScreenContentsType
    { 
        None=0,
        Screen_saver,
        Qualify_lotery,
        Qualify_player_results,
        Qualify_machines_results,
        Qualify_round_table,
        Playoffs_lotery,
        Playoffs_player_results,
        Playoffs_machines_results,
        Playoffs_round_table,
        Player_profile,
        Identify_Screen
    }
    public ScreenContentsType oScreenContentsType;
    public int? PKTournament;
    public int ScreenNumber;

    public ScreenContent() { }
    public ScreenContent(ScreenContentsType ScreenContentsType,int ScreenNumber,int? p_Pk_Tournament)
    {
        this.oScreenContentsType = ScreenContentsType;
        this.ScreenNumber = ScreenNumber;
        this.PKTournament = p_Pk_Tournament; 
    }
    public ScreenContent(ScreenContent pScreenContent) {
        this.PKTournament = pScreenContent.PKTournament;
        this.oScreenContentsType = pScreenContent.oScreenContentsType;
        this.PKTournament = pScreenContent.PKTournament;
    }

    public static ScreenContent GetScreenContent(int ScreencContenId, HttpContext Contenx) {
        try
        {
            if (Contenx.Application["Screen" + ScreencContenId.ToString()] != null)
            {
                //Retornamos la pantalla
                return new ScreenContent(); 
            }
            else
            {
                return null;
            }
        }
        catch (Exception) {
            return null;
        } 
    }
}
